package cn.juque.jdfsystem.console.dispatch;

import cn.juque.jdfsystem.console.task.RegisterInfoRefreshTask;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>DispatchService</li>
 * </ul>
 * @date 2023-01-20 09:25:50
 **/
@Service("dispatchService")
public class DispatchService {

    @Resource
    private RegisterInfoRefreshTask registerInfoRefreshTask;

    @Scheduled(cron = "0/2 * * * * ?")
    public void executeRegisterInfoRefresh() {
        this.registerInfoRefreshTask.start(null);
    }
}
